package com.ycx.ycxmybatismanagement.mapper;

import com.github.pagehelper.Page;
import com.ycx.ycxmybatismanagement.dto.EmpListDTO;
import com.ycx.ycxmybatismanagement.dto.StudentCountDataDTO;
import com.ycx.ycxmybatismanagement.pojo.Emp;
import com.ycx.ycxmybatismanagement.vo.EmpGenderVo;
import com.ycx.ycxmybatismanagement.vo.EmpListVo;
import com.ycx.ycxmybatismanagement.vo.JobValueVo;
import com.ycx.ycxmybatismanagement.vo.StudentDegreeDataVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface EmpMapper {

 public List<EmpListVo> selectEmpList();

 /**
  * 总个数
  * @return
  */
 int countEmp();

 List<EmpListVo> selectPage(@Param("start") int start,@Param("pageSize") Integer pageSize);

 Page<EmpListVo> selectPageHelper(EmpListDTO empListDTO);

 void addEmp(Emp emp);

    void deleteEmpsByIds(List<Integer> ids);
@Select("select * from emp where id =#{id}")
 Emp selectEmpById(Integer id);

    void updateEmp(Emp emp);
    @Select("select * from emp where username =#{username}")
    Emp selectUsername(String username);
    @Select("select * from emp where phone =#{phone}")
    Emp selectPhone(String phone);

    List<JobValueVo> empJobValue();

    List<EmpGenderVo> empGenderValue();

    List<StudentDegreeDataVO> studentDegreeData();

    List<StudentCountDataDTO> selectClazzList();
}
